import { defHttp } from "@/utils/http";

// ERP 产品库存明细 VO
export interface StockRecordVO {
	id: number; // 编号
	drugId: number; // 产品编号
	warehouseId: number; // 仓库编号
	count: number; // 出入库数量
	totalCount: number; // 总库存量
	bizType: number; // 业务类型
	bizId: number; // 业务编号
	bizItemId: number; // 业务项编号
	bizNo: string; // 业务单号
}

// ERP 产品库存明细 API
export const StockRecordApi = {
	// 查询产品库存明细分页
	getStockRecordPage: async (params: any) => {
		return await defHttp.get({ url: `/whs/invt-record/page`, params });
	},

	// 查询产品库存明细详情
	getStockRecord: async (id: number) => {
		return await defHttp.get({ url: `/whs/invt-record/get?id=` + id });
	},

	// 导出产品库存明细 Excel
	exportStockRecord: async (params: any) => {
		return await defHttp.download({ url: `/whs/invt-record/export-excel`, params });
	}
};
